/** @file GOTHspiExtra.c This file contains the source code for the SPI-Extra Peripheral API of the 
 * GOTH Kick-ass Etherboard.
 * 
 * This API contains all commands to control, read from and write to the extra peripheral.
 *
 * @author Geoffrey Ottoy - Tom Hamelinckx
 * @date 05/07/2011 (last modified)
 * @todo To be filled with extra functions, once the peripheral is selected
 *
 * <pre>
 * MODIFICATION HISTORY:
 *
 * Who  Date     Changes
 * ---- -------- ---------------------------------------------------------
 * TH   05/07/11 Created this file.
 * </pre>
 * 
 */
 
 
#include "GOTHspiExtra.h"

 
/** Initialize extra peripheral CS-pin for operation.
 * 
 * @return	nothing
 *
 */ 
void SPI_InitExtra(void){
	SPI_InitSpi2();
 
	AD1PCFGLbits.PCFG10 = 1; 	//Tell analog it's a digital on /SS (extra SPI-peripheral)
	TRISBbits.TRISB10 = 0;		//Set /SS as output
	LATBbits.LATB10 = 1; 		//Set /SS high (so device is NOT selected)

}

